package com.wenjunwu.blog.dao.impl;

import org.springframework.stereotype.Repository;

import com.wenjunwu.blog.common.BaseDao;
import com.wenjunwu.blog.dao.SystemTokenDao;
import com.wenjunwu.blog.entity.SystemToken;

@Repository
public class SystemTokenDaoImpl extends BaseDao<SystemToken> implements SystemTokenDao {

	@Override
	public int deleteByPrimaryKey(String series) {
		return sqlSession.delete(DEFAULTNAMESPACE.concat("deleteByPrimaryKey"),series);
	}

	@Override
	public int insert(SystemToken record) {
		return sqlSession.insert(DEFAULTNAMESPACE.concat("insert"), record);
	}

	@Override
	public int insertSelective(SystemToken record) {
		return 0;
	}

	@Override
	public SystemToken selectByPrimaryKey(String series) {
		return sqlSession.selectOne(DEFAULTNAMESPACE.concat("selectByPrimaryKey"), series);
	}

	@Override
	public int updateByPrimaryKeySelective(SystemToken record) {
		return 0;
	}

	@Override
	public int updateByPrimaryKey(SystemToken record) {
		return sqlSession.update(DEFAULTNAMESPACE.concat("updateByPrimaryKey"), record);
	}

	@Override
	public int deleteByUsername(String username) {
		return sqlSession.delete(DEFAULTNAMESPACE.concat("deleteByUsername"), username);
	}

}
